﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="../MasterPage.Master"
    CodeBehind="wfCondicionPago.aspx.cs" Inherits="CO.wfCondicionPago" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <base target="_self" />
     <script  type="text/javascript">
         window.onload = function () {
             this.ResizeGrid();
             this.MessageOnPostback();
         }

         function ResizeGrid() {
             internalGridResize("<%= gvListar.ClientID %>");
         }

         function rowDblClick(rowIndex) {
            var row = getGridRowByIndex('<%= gvListar.ClientID %>', rowIndex);
            var objValues = [];
            objValues[0] = getObjInnerText(row.cells[0]);
            objValues[1] = getObjInnerText(row.cells[1]);
            objValues[2] = getObjInnerText(row.cells[2]);
            objValues[3] = getObjInnerText(row.cells[3]);
    
            window.returnValue = objValues;
            window.close();
         }

         function panelOnUpdating() {
             updatePanelAnimationUpdating();
         }

         function panelOnUpdated() {
             ResizeGrid();
             updatePanelAnimationUpdated();
         }
     </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">   
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
       <ContentTemplate>
        <div class="DataHeader">
        <table id="TableDataHeader" cellpadding="0" cellspacing="0">
            <tr>
                <td colspan="11">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td style="width: 10px;">
                    &nbsp;
                </td>
                <td>
                    Codigo : 
                </td>
                <td>
                        <asp:TextBox ID="txtCodigo" runat="server" CssClass="esdTextBox" 
                        Width="100px"></asp:TextBox>
                    </td>
                <td>
                    Descripción :
                </td>
                <td>
                        <asp:TextBox ID="txtDescrip" runat="server" CssClass="esdTextBox" 
                        Width="300px" TabIndex="2"></asp:TextBox>
                    </td>
                <td colspan="4">
                    &nbsp;
                </td>
                <td>
                        <asp:Button ID="btnBuscar" runat="server" 
                            Text="Buscar" CssClass="esdButtonStyle" Width="80px" 
                            onclick="btnBuscar_Click" TabIndex="3" />
                    </td>
                <td style="width: 10px;">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td colspan="11">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td style="width: 10px;">
                    &nbsp;
                </td>
                <td>
                    Día:
                </td>
                <td>
                        <asp:TextBox ID="txtDia" runat="server" CssClass="esdTextBox" 
                        Width="100px" TabIndex="1"></asp:TextBox>
                    </td>
                <td colspan="6">
                    &nbsp;
                </td>
                <td>
                        <asp:Button ID="btnLimpiar" runat="server"  Text="Limpiar" 
                        CssClass="esdButtonStyle" Width="80px" />
                    </td>
                <td style="width: 10px;">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td colspan="11">
                    &nbsp;
                </td>
            </tr>
        </table>
        </div> 
    <div>
    <div class="DataDetail">
        <esd:esdGridView  CssClass="esdGridView" ID="gvListar" runat="server" ScrollWidth="100%" 
            Width="100%" ShowHeaderWhenEmpty="True" AutoGenerateColumns="False" DataKeyNames="RowNumber"
            OnRowCreated="gvListar_RowCreated" > 
            <Columns>
                <asp:BoundField DataField="RowNumber" HeaderText="N°"></asp:BoundField>
                <asp:BoundField DataField="id_condpago" HeaderText="Codigo"></asp:BoundField>
                <asp:BoundField DataField="ds_condpago" HeaderText="Descripción"></asp:BoundField>
                <asp:BoundField DataField="qt_docu" HeaderText="Nro Dias"></asp:BoundField>
                <%-- <asp:TemplateField>
                    <ItemTemplate>
                        <a href="javascript:void(0)" id="lnkSeleccionar" runat="server">Seleccionar</a>
                    </ItemTemplate>
                </asp:TemplateField>--%>
            </Columns>
            <EmptyDataTemplate>
                <div id="gridempty">
                    <asp:Image ID="imgEmpty" runat="server" ImageUrl="../Images/Controls/Attention.png" />
                    &nbsp;No existen registros para esta solicitud.
                </div>
            </EmptyDataTemplate>
        </esd:esdGridView>
    </div>
       </ContentTemplate> 
</asp:UpdatePanel>
<ajax:UpdatePanelAnimationExtender ID="upae" BehaviorID="animation" runat="server"
    TargetControlID="updatePanel1">
    <animations>
        <OnUpdating>
        <Parallel duration="0.5">
            <ScriptAction Script="panelOnUpdating();" />  
        </Parallel>
        </OnUpdating>
        <OnUpdated>
        <Parallel duration="0.5">
            <ScriptAction Script="panelOnUpdated();" /> 
        </Parallel> 
        </OnUpdated>
    </animations>
</ajax:UpdatePanelAnimationExtender>
<div id="updateProgressDiv" class="updateProgress" style="display: none">
        <table width="100%">
            <tr>
                <td valign="middle">
                    <img src="../Images/Controls/Loading.gif" />
                </td>
                <td valign="middle">
                    <span class="updateProgressMessage">Cargando ...</span>
                </td>
            </tr>
        </table>
</div>
</asp:Content>